﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;

namespace DataManage
{
    public class MBMUInfo : BaseViewModel
    {
        private ObservableCollection<PrimaryControlSBMUInfo> primaryControlSBMUData;
        /// <summary>
        /// 一级主控SBMU数据集合
        /// </summary>
        public ObservableCollection<PrimaryControlSBMUInfo> PrimaryControlSBMUData { get => primaryControlSBMUData; set { primaryControlSBMUData = value; NotifyPropertyChanged(); } }

        private double? bmsVoltage;
        /// <summary>
        /// 储能系统总电压
        /// </summary>
        public double? BmsVoltage { get => bmsVoltage; set { bmsVoltage = value; NotifyPropertyChanged(); } }
        private double? bmsCurrent;
        /// <summary>
        /// 储能系统总电流
        /// </summary>
        public double? BmsCurrent { get => bmsCurrent; set { bmsCurrent = value; NotifyPropertyChanged(); } }
        private double? bmsPower;
        /// <summary>
        /// 储能系统总功率
        /// </summary>
        public double? BmsPower { get => bmsPower; set { bmsPower = value; NotifyPropertyChanged(); } }
        private double? bmsChgDchEfficiency;
        /// <summary>
        /// 储能系统充放电效率
        /// </summary>
        public double? BmsChgDchEfficiency { get => bmsChgDchEfficiency; set { bmsChgDchEfficiency = value; NotifyPropertyChanged(); } }

        private string systemRunState;
        public string SystemRunState { get => systemRunState; set { systemRunState = value; NotifyPropertyChanged(); } }
      
        private string chgDchState;
        public string ChgDchState { get => chgDchState; set { chgDchState = value; NotifyPropertyChanged(); } }

        private string systemFaultState;
        public string SystemFaultState { get => systemFaultState; set { systemFaultState = value; NotifyPropertyChanged(); } }

        private string muteEnable;
        /// <summary>
        /// 消音使能
        /// </summary>
        public string MuteEnable { get => muteEnable; set { muteEnable = value; NotifyPropertyChanged(); } }

        private string singleClusterMaintenanceEnable;
        /// <summary>
        /// 单簇维护使能
        /// </summary>
        public string SingleClusterMaintenanceEnable { get => singleClusterMaintenanceEnable; set { singleClusterMaintenanceEnable = value; NotifyPropertyChanged(); }}
        private double? soc;
        /// <summary>
        /// 显示SOC
        /// </summary>
        public double? SOC { get => soc; set { soc = value; NotifyPropertyChanged(); } }
        private double? soe;
        public double? SOE { get => soe; set { soe = value; NotifyPropertyChanged(); } }
        private double? soh;
        public double? SOH { get => soh; set { soh = value; NotifyPropertyChanged(); } }
        private double? sor;
        public double? SOR { get => sor; set { sor = value; NotifyPropertyChanged(); } }

        private Dictionary<string, double?> otherInfo;
        /// <summary>
        /// 其他信息：
        /// <para>外总压</para>
        /// <para>负极总压</para>
        /// <para>最大允许充电电流</para>
        /// <para>最大允许放电电流</para>
        /// <para>最大允许充电功率</para>
        /// <para>最大允许放电功率</para>
        /// <para>最大电池簇电流</para>
        /// <para>最大电池簇电流簇号</para>
        /// <para>最小电池簇电流</para>
        /// <para>最小电池簇电流簇号</para>
        /// <para>簇间电流极差</para>
        /// <para>可用SOC</para>
        /// <para>当前可充容量</para>
        /// <para>当前可充电量</para>
        /// <para>当前可放容量</para>
        /// <para>当前可放电量</para>
        /// <para>正端绝缘电阻</para>
        /// <para>负端绝缘电阻</para>
        /// <para>充电插座1CC2阻值</para>
        /// <para>充电插座1CC2阻值</para>
        /// <para>快充口01插座正极温度</para>
        /// <para>快充口01插座负极温度</para>
        /// <para>快充口02插座正极温度</para>
        /// <para>快充口02插座负极温度</para>
        /// <para>环境温度1</para>
        /// <para>环境温度2</para>
        /// <para>DI状态</para>
        /// <para></para>
        /// </summary>
        public Dictionary<string, double?> OtherInfo { get => otherInfo; set { otherInfo = value; NotifyPropertyChanged(); } }
        private Dictionary<string, RelayStatus> relayInfo;
        /// <summary>
        /// 继电器信息集合、干接点状态
        /// </summary>
        public Dictionary<string, RelayStatus> RelayInfo { get => relayInfo; set { relayInfo = value; NotifyPropertyChanged(); }}
        private Dictionary<string, double?> batteryCellData;
        /// <summary>
        /// 电芯数据
        /// <para>最高电芯电压</para>
        /// <para>最高电芯电压簇号</para>
        /// <para>最低电芯电压</para>
        /// <para>最低电芯电压簇号</para>
        /// <para>电芯压差</para>
        /// <para>最高电池温度</para>
        /// <para>最高电池温度簇号</para>
        /// <para>最低电池温度</para>
        /// <para>最低电池温度簇号</para>
        /// <para>电池温差</para>
        /// </summary>
        public Dictionary<string, double?> BatteryCellData { get => batteryCellData; set { batteryCellData = value; NotifyPropertyChanged(); } }
        private string mbmuSoftwareVersion;
        /// <summary>
        /// 软件版本
        /// </summary>
        public string MBMUSoftwareVersion { get => mbmuSoftwareVersion; set { mbmuSoftwareVersion = value; NotifyPropertyChanged(); } }

        private string mbmuHardwareVersion;
        /// <summary>
        /// 硬件版本
        /// </summary>
        public string MBMUHardwareVersion { get => mbmuHardwareVersion; set { mbmuHardwareVersion = value; NotifyPropertyChanged(); } }
        private DateTime rtc;
        /// <summary>
        /// 时钟信息
        /// </summary>
        public DateTime RTC { get => rtc; set => rtc = value; }
        /// <summary>
        /// SBMU的个数
        /// </summary>
        public int SBMUNum { get; set; }
    }
}
